package com.tuzhi.sys.service;

import com.tuzhi.base.service.BaseService;
import com.tuzhi.sys.jpa.entity.SysRoleEntity;
import com.tuzhi.sys.jpa.entity.SysUserEntity;

import java.util.Collection;
import java.util.List;
import java.util.Set;

public interface SysUserService extends BaseService<SysUserEntity, Long> {
    SysUserEntity getUserByUserName(String userName);

    List<SysRoleEntity> listRoles4UserName(String userName);

    void modifyPwd(String oldPwd, String newPwd, String userName);

    void modifyPwd4Amin(String newPwd, String userName);

    SysUserEntity saveUserAndRole(SysUserEntity sysUserEntity);

    void modifyStauts(Long userId, Integer sysStatus);

    Set<Long> roleName2RoleIds(Collection<String> roleName);

    SysUserEntity getUserByMobile(String mobile);
}
